<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>法律声明</title>
		<link rel="stylesheet" href="../src/css/bootstrap.min.css" />
		<link rel="stylesheet" href="../public/css/my_style.css" />
		<style type="text/css">
			#app {
				padding-bottom: 40px;
			}			
			#app header {
				font-size: 0.3rem;
				padding: 20px;
				background-color: #ff9e2b;
				color: white;
			}
			
			#app .content .title {
				font-size: 0.2rem;
				padding: 10px 0;
			}
			
			#app .content .title .title_m {
				font-size: 0.18rem;
				text-indent: 2em;
			}
			
			#app .content .title .title_m .title_mm {
				font-size: 0.16rem;
				text-indent: 4em;
			}
			
			#app .content .title .title_m .title_mm .title_mmm {
				font-size: 0.14rem;
				text-indent: 6em;
			}
		</style>
	</head>

	<body>
		<div id="app">
			<header class="text-center">
				<span class="text-center">IFA 法律声明</span>
			</header>
			<div class="content my_container" v-html="content">

			</div>
			<div class="my_container" style="padding: 20px 0;text-align: center;">
				<button type="button" style="width: 50%;" class="btn btn-base confirm" data-dismiss="modal" @click="legalYes">同 意</button>
			</div>

		</div>
		<script src="../src/jquery.js"></script>
		<script src="../src/vue.min.js"></script>
		<script src="../public/js/comm.js"></script>		
		<script>
			var app = new Vue({
				el: '#app',
				data: {
					type: '',
					content: "",
					url: {
						getLawIntroduce: '/api/UserInfo/GetLawIntroduce',
						agreeLegalDeclaration: '/api/LegalDeclaration/AgreeLegalDeclaration',
					}
				},
				mounted: function() {
					this.getLawIntroduce();
					var req = globalData.utils.getUrl()
					if(req) {
						if(req.type) {
							this.type = req.type
						}
					}
				},
				methods: {
					getLawIntroduce: function() {
						var that = this;
						globalData.ajaxPost(this.url.getLawIntroduce, {}, function(res) {
							that.content = res.data.Content;
						})
					},
					//同意
					legalYes: function() {
						globalData.ajaxPost(this.url.agreeLegalDeclaration, {}, function(res){
							if(res.suc)
								globalData.utils.setUrl("../index.html");
						})
					}
				},
				
			})
		</script>
	</body>

</html>